<template>
    <div class="content">
        <headerc :title="title"></headerc>
        <el-button class='turnBack' @click="turnBack">返回</el-button>
        <div class="detailbox">
            
            <el-form ref="detailList" :model="detailList" label-width="130px">
                <el-form-item label="小课主题:">
                <el-input v-model="detailList.courseTheme" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="授课时间:">
                <el-input v-model="courseTime1" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="部门:">
                <el-input v-model="detailList.workshop" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="班组:">
                <el-input v-model="detailList.team" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="是否按计划执行:">
                {{detailList.isPlan?'是':'否'}}
                </el-form-item>
                <el-form-item label="授课人:">
                <el-input v-model="detailList.lecturerName" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="班组审核人:">
                <el-input v-model="detailList.teamAuditor" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="车间审核人:">
                <el-input v-model="detailList.workshopAuditor" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="应到人数:">
                <el-input v-model="detailList.shouldNumber" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="小课目的:">
                <el-input v-model="detailList.purpose" type="textarea" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="参加人员:">
                <el-input v-model="detailList.participation" type="textarea" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="不参加人员:">
                <el-input v-model="detailList.nonArrivalNames" type="textarea" :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="不参加原因:">
                <el-input v-model="detailList.nonArrivalCause" type="textarea" :disabled="true"></el-input>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script>
    import headerc from "@/components/header.vue";
    import utils from "@/utils/utils";
    import { detailsCourse } from '@/api/micro-train'
    export default {
        components: {
            headerc,
        },
        data(){
            return {
                title:"培训详情",
                detailList:{},
                courseTime1:''
            }
        },
        created(){
            detailsCourse({"id":this.$route.query.id}).then(res=>{
                console.log('111',res)
                this.detailList = res.data;
                this.courseTime1 = utils.formatDate(this.detailList.courseTime,'yyyy-MM-dd HH:mm:ss')
                console.log(this.courseTime1)
            })
        },
        mounted(){
            
        },
        methods:{
            turnBack(){
                this.$router.push('Records')
            }
        },
    }
</script>

<style lang="scss" scoped>
.content{
    overflow: hidden;
    position: relative;

    .detailbox{
        width: 90%;
        height: 600px;
        margin-left: 5%;
        background-color: #f0f2f5;
        display: flex;
        flex-direction:row;
        flex-wrap:wrap;
        justify-content:space-around;
        padding: 20px;

        
    }
    .turnBack {
        position: absolute;
        right: 30px;
        top: 70px;
    }
}

</style>